import {dateFormat} from "../../index";
import {DateFormatType} from "../../src/modules/dateFormat";

const date = new Date();
console.log(dateFormat(date, DateFormatType.ISO));
console.log(dateFormat(date, DateFormatType.Date));
console.log(dateFormat(date, DateFormatType.Time));
console.log(dateFormat(date, DateFormatType.DateTime));

console.log('----------------------------------------');

const dateStr = '2019-10-12';
console.log(dateFormat(dateStr, DateFormatType.ISO));
console.log(dateFormat(dateStr, DateFormatType.Date));
console.log(dateFormat(dateStr, DateFormatType.Time));
console.log(dateFormat(dateStr, DateFormatType.DateTime));
